﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MemberInfoList.aspx.cs" Inherits="Facefar.Futures.Manage.Right.MemberInfoList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="tb">
        <div style="margin-bottom: 5px">
            <%=R(LanguageModule.M_Common, "MemberAccount","會員賬號") %>：<input id="MemberAccount" name='MemberAccount' class="input_no_width" />
            <%=R(LanguageModule.MemberBasicInfo, "Email","Email") %>：<input id="Email" name='Email' class="input" />
            <%=R(LanguageModule.M_Common, "CreateTime","創建時間") %> ：<input id="CreateTime" name='CreateTime' class="easyui-datebox input_no_width" />
            <%=R(LanguageModule.M_Common, "Status","狀態") %>：<select id="Status" name='Status' class="easyui-combobox" data-options="editable:false">
                <option value=""><%=R(LanguageModule.M_Common, "ALL","所有") %></option>
                <option value="1"><%=R(LanguageModule.M_Common, "Enable","啟用") %></option>
                <option value="0"><%=R(LanguageModule.M_Common, "Disable","禁用") %></option>
            </select>
            <a href="#" class="easyui-linkbutton " data-options="iconCls:'icon-search'" onclick="query()"><%=R(LanguageModule.M_Common, "Query","查詢") %></a>
        </div>
    </div>
    <table id="table" class="easyui-datagrid" border="0"
        data-options="url:'/Member/Handlers/Member_Handler.ashx?type=QueryMember',
            rownumbers:true,
            pageSize:50,
            singleSelect:false,
            pagination:true,
            fit:true,
            fitColumns:true,
            rowStyler:adminColor,
            toolbar:'#tb'">
        <thead>
            <tr>
                <th data-options="field:'MemberAccount',width:10"><%=R(LanguageModule.M_Common, "MemberAccount","會員賬號") %></th>
                <th data-options="field:'MemberID',width:8"><%=R(LanguageModule.MemberBasicInfo, "MemberID","會員ID ") %></th>
                <th data-options="field:'LastName',width:15"><%=R(LanguageModule.MemberBasicInfo, "MemberName","會員名稱") %></th>
                <th data-options="field:'RecommendMemberAccount',width:15"><%=R(LanguageModule.MemberBasicInfo, "IntroducerAccount","推薦人賬號") %></th>
                <th data-options="field:'ParentMemberAccount',width:15"><%=R(LanguageModule.MemberBasicInfo, "PlacementAccount","父級會員賬號 ") %></th>
                <th data-options="field:'Name',width:10,align:'center'"><%=R(LanguageModule.MemberBasicInfo, "Nationality","國籍 ") %></th>
                <th data-options="field:'Email',width:15"><%=R(LanguageModule.MemberBasicInfo, "Email","Email") %></th>
                <th data-options="field:'Status',width:10,align:'center',formatter:Status"><%=R(LanguageModule.M_Common, "Status","狀態") %></th>
                <th data-options="field:'CreateTime',width:10,align:'center'"><%=R(LanguageModule.M_Common, "CreateTime","創建時間") %></th>
            </tr>
        </thead>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        function query() {
            var CreateTime = $("#CreateTime").datebox('getValue');
            if (!validateDate(CreateTime)) {
                return false;
            }
            $('#table').datagrid('load', {
                MemberAccount: $('#MemberAccount').val(), Email: $('#Email').val(), CreateTime: $("#CreateTime").datebox('getValue'), Status: $('#Status').combobox("getValue")

            });
        }

        function adminColor(index, row) {
            if (row.ParentMemberAccount == "") {
                return 'background-color:rgb(228, 247, 255);';
            }
        }
        function Status(value, row) {

            return value == '啟用' ? '<span style="color:green"><%=R(LanguageModule.M_Common, "Enable", "啟用") %></span>' : '<span style="color:red"><%=R(LanguageModule.M_Common, "Disable", "禁用") %></span>';

        }
        function select() {
            var row = $('#table').datagrid('getSelections');

            if (row) {
                return row;
            }
            else {
                return null;
            }
        }
    </script>
</asp:Content>
